package com.cmrx.model.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.cmrx.model.entity.CaseDetail;
import com.cmrx.model.entity.LostGoods;
import com.cmrx.model.entity.Victim;
import com.cmrx.model.entity.Witness;

@Mapper
@Repository
public interface InvestigationDao {
	
	List<CaseDetail> selectListLawCase(@Param("userid") String userid, @Param("investigationid") String investigationid);
	
	List<Witness> selectWitnessesByInvestigationid(@Param("investigationid") String investigationid);
	
	List<LostGoods> selectLostGoodsByInvestigationid(@Param("investigationid") String investigationid);
	
	List<Victim> selectVictimsByCaseId(@Param("caseid") String caseid);
	
	List<String> selectInfoIds(@Param("techid") String techid, @Param("casetype") String casetype, @Param("regionalism") String regionalism);
	
	int addLawCase(Map<String, Object> map);
	
	int addInvestigation(Map<String, Object> map);

	int addAnalysis(Map<String, Object> map);
	
	int deleteCase(@Param("caseid") String caseid);
	
	int deleteInvestigation(@Param("investigationid") String investigationid);
	
	int updateInvestigation(CaseDetail caseDetail);
	
	int updateAttachment(CaseDetail caseDetail);
	
	int insertAttachment(CaseDetail caseDetail);
	
	int updateBigtextClob(CaseDetail caseDetail);
	
	int insertBigtextClob(CaseDetail caseDetail);
	
	int updateReceptionDispatch(CaseDetail caseDetail);
	
	int insertReceptionDispatch(CaseDetail caseDetail);
	
	int updateLawCase(CaseDetail caseDetail);
	
	int updateWitness(Witness witness);
	
	int insertWitness(Witness witness);
	
	int deleteWitness(Witness witness);
	
	int updateLostgoods(LostGoods lostGoods);
	
	int insertLostgoods(LostGoods lostGoods);

	int deleteLostgoods(LostGoods lostGoods);
	
	int updateVictim(Victim victim);

	int insertVictim(Victim victim);
	
	int deleteVictim(Victim victim);

	int selectCountPicture(@Param("investigationid") String investigationid);

	int selectCountPhoto(@Param("investigationid") String investigationid);

	int updateSubmitCase(@Param("investigationid") String investigationid);

	int updateAnalysisPlace(CaseDetail caseDetail);

	int selectCountLostgoods(@Param("investigationid") String investigationid);

	int selectCountWitness(@Param("investigationid") String investigationid);

	List<Map<String,String>> selectUserByRegionalism(@Param("regionalism") String regionalism);

	Map<String,String> queryInvestigator(String id);

	int updateAmount(@Param("investigationid") String investigationid
			,@Param("scenePictureAmount")int scenePictureAmount,@Param("scenePhotoAmount")int scenePhotoAmount
			,@Param("footprintAmount")int footprintAmount,@Param("bioEvienceAmount")int bioEvienceAmount
			,@Param("videoEvienceAmount")int videoEvienceAmount);


	int updateLawCaseReserver(Map<String,Object> map);

}
